<template>
  <div class="selectField">
    <!-- 多选框 -->
    <p>{{ item.name }}</p>
    <el-select
      :value="item.value"
      placeholder="请选择"
      @change="changevalue(item.name, $event)"
    >
      <el-option
        v-for="val in item.options"
        :key="val.value"
        :label="val.label"
        :value="val.value"
      />
    </el-select>
  </div>
</template>
<script>
export default {
  props: {
    item: { type: Object, require: true }
  },
  // 接收改变value值的函数
  inject: ['changevalue']
}
</script>
<style scoped lang="scss"></style>
